;;;
;;;	Author: Henry C. Francis
;;;		425 N. Ashe St.
;;;		Southern Pines, NC 28387
;;;
;;;	http://www.paracadd.com
;;;	All rights reserved.
;;;
;;;	Copyright:	10-28-2014
;;;	   Edited:	10-28-2014
;;;
(DEFUN hatchit (patname / )
  (IF (FINDFILE (STRCAT patname ".pat"))
    (PROGN
      (IF dimscl NIL (LOAD "dimscl" "\nFile DIMSCL.LSP not loaded! "))
      (dimscl)
      (IF upoint NIL (LOAD "upoint" "\nFile UPOINT.LSP not loaded! "))
      (SETQ hatch_pnt (upoint 1 "Select" "Pick area to hatch or [Select object]" NIL NIL))
      (IF (EQ hatch_pnt "Select")
        (PROGN
          (SETQ hatch_obj (ENTSEL))
          (SETQ hatch_ename (CAR hatch_obj))
          (COMMAND "-bhatch" "O" "S" (REVERSE (CDR (REVERSE (CADR hatch_obj)))) "N" "S" hatch_ename "" "P" patname dimsc "" "")
        )
        (PROGN
          (COMMAND "-bhatch" "O" "S" (REVERSE (CDR (REVERSE hatch_pnt))) "N" (REVERSE (CDR (REVERSE hatch_pnt))) "P" patname dimsc "" "")
        )
      )
    )
  )
  (PRINC)
)